package com.lancer.backlog.common.bean;

/**
 * @author zhaoyue
 * @email 3601704681@qq.com
 * @date Created in  2020/8/20  20:09
 * @description TODO
 */
public enum  StatusBean {
    /**
     * 成功
     */
    SUCCESS(200,"成功"),

    FAIL(417,"失败"),

    /**
     * 参数异常
     */
    PARAM_ERROR(405,"参数无效"),

    /**
     * 用户错误: 2001-2999
     */
    USER_ACCOUNT_FORBIDDEN(2001,"账号未审核"),

    USER_LOGIN_ERROR(2002,"密码错误"),

    USER_NOT_EXISTS(2003,"用户不存在"),

    USER_HAS_EXISTS(2004,"用户已存在"),

    /**
     * 系统错误
     */
    SYSTEM_ERROR(500,"系统内部异常");


    private Integer code;
    private String msg;

    public Integer code(){
        return this.code;
    }
    public String msg(){
        return this.msg;
    }

    StatusBean(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return code;
    }

    public String getMsg(){
        return msg;
    }
}
